package A一周刷爆LeetCode.A基础班.C认识NlogN的排序;

/**
 * @author wei.zhao
 * @description: 测试
 * @date 2022年01月10日 14:51
 */
public class Test {

    public static void main(String[] args) {
        System.out.println("------------归并排序-----------------");
        new Code01_MergeSort().test();
        System.out.println("------------小和问题-----------------");
        int smallSum = Code02_SmallSum.smallSum(new int[]{1, 4, 7, 9, 6, 2, 3});
        System.out.println(smallSum);
        System.out.println("------------逆序对问题-----------------");
        int inversionPair = Code03_InversionPair.inversionPair(new int[]{6, 1, 4, 5, 7, 8});
        System.out.println(inversionPair);
        System.out.println("------------小于某个数放在左边，大于某个数放在右边-----------------");
        Code04_PartitionByNum.partitionByNum(new int[]{9, 6, 1, 4, 5, 7, 8, 3, 2, 11, 5, 10, 18}, 5);
        System.out.println("------------荷兰国旗问题-----------------");
        Code05_NetherlandsFlag.partition(new int[]{9, 6, 1, 4, 5, 7, 8, 3, 2, 5, 11, 21, 5, 5}, 5);
        System.out.println("------------快排1.0版本-----------------");
        new Code06_QuickSort01().test();
        System.out.println("------------快排2.0版本-----------------");
        new Code07_QuickSort02().test();
        System.out.println("------------快排3.0版本-----------------");
        new Code08_QuickSort03().test();
        System.out.println("------------堆排序-----------------");
        new Code09_HeapSort().test();
        System.out.println("------------几乎有序的排序-----------------");
        Code10_SortArrayDistanceLessK.test(new int[]{1, 2, 3, 4, 5, 8, 7, 6, 9, 10, 15, 12, 13, 11, 16, 17, 18, 22, 20, 21, 19, 23, 24, 25, 30, 27, 28, 29, 26}, 5);
    }

}
